package com.ms.p2p.provider;


import com.ms.p2p.bean.PageBean;
import com.ms.p2p.entity.account.Account;
import com.ms.p2p.entity.account.AccountBank;
import com.ms.p2p.entity.member.Auth;

import java.util.List;
import java.util.Map;

/**
 * 银行卡
 */
public interface MemberAccountBankProvider {


	/**
	 *
	 * 用用户名查找银行卡
	 *
	 * @param userId
	 * @return
	 */
	public AccountBank findByUserId(int userId);

	/**
	 * 新增银行卡
	 * @return
	 */
	public int insert(AccountBank bank) ;

	/**
	 * 根据用户ID修改银行卡
	 *
	 * @param bank
	 * @return
	 */
	public int updateByUserId(AccountBank bank);

	public List<Map<String, Object>> findPager(String userId, String userName,
											   PageBean page) ;


	public List<Map<String, Object>> findAll(String userId, String userName) ;

	public int findCount(String userId, String userName) ;


	public Auth selectRealByUserId(int user_id) ;

	public AccountBank selectMrAccountBankByUserId(int user_id);

	public Account selectAccountByUserId(int user_id);

	public AccountBank selectAccountBankByUserId(int user_id);


	public AccountBank selectAccountBankById(String id) ;

	public int inserted(AccountBank bank, String paypassword, int id, String bankId);

	void delete(Integer bank_id);
}
